/* === CSS变量定义 === */
:root {
    --primary-color: #3498db;
    --bg-color: #f5f7fa;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --border-color: #e0e6ed;
    --shadow-color: rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #4a9fff;
    --bg-color: #1a1a2e;
    --text-color: #e6e6e6;
    --card-bg: #16213e;
    --border-color: #2d3746;
    --shadow-color: rgba(0,0,0,0.4);
}

/* === 基础样式 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === 主题切换按钮 === */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-color);
    z-index: 1000;
    font-size: 1.2rem;
}

/* === 头部样式 === */
header {
    text-align: center;
    padding: 60px 0 40px;
    background: linear-gradient(135deg, var(--primary-color), #6c5ce7);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-color);
}

.my-name {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* === 学习追踪器样式 === */
.study-tracker {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.study-progress {
    margin-bottom: 15px;
}

.progress-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.hours-count {
    color: #ffd700;
    font-size: 1.3rem;
    font-weight: bold;
}

.progress-bar {
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffd700, #ff6b6b);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.progress-fill.completed {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.study-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.study-btn, .reset-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.study-btn {
    background: #27ae60;
    color: white;
}

.study-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
}

.reset-btn {
    background: #e74c3c;
    color: white;
}

.reset-btn:hover {
    background: #c0392b;
}

.goal-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
}

.goal-selector select {
    padding: 5px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
}

/* === 导航样式 === */
nav {
    background: var(--card-bg);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-color);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
}

nav a:hover {
    background: var(--primary-color);
    color: white;
}

/* === 内容区域 === */
section {
    background: var(--card-bg);
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-color);
    border: 1px solid var(--border-color);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.8rem;
}

/* === 学习历史样式 === */
.history-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.stats-card {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.stats-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed var(--border-color);
}

.stat-label {
    color: var(--text-color);
    opacity: 0.8;
}

.stat-value {
    font-weight: bold;
    color: var(--primary-color);
}

.history-list {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.history-item:last-child {
    border-bottom: none;
}

.time {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

.action {
    font-weight: 500;
}

.type {
    text-align: right;
    font-size: 0.8rem;
    opacity: 0.6;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    opacity: 0.5;
}

/* === 技能区域样式 === */
.skills-container {
    margin-top: 1rem;
}

.skills-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.search-box {
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

.search-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.sort-controls {
    margin-bottom: 1.5rem;
}

.sort-select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-color);
    color: var(--text-color);
}

.skill-item {
    background: var(--bg-color);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    font-weight: bold;
    color: var(--text-color);
}

.skill-percent {
    color: var(--primary-color);
    font-weight: bold;
}

.skill-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #6c5ce7);
    border-radius: 4px;
    transition: width 0.8s ease-in-out;
}

.skill-desc {
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* === 项目区域样式 === */
.project-item {
    background: var(--bg-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.project-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* === 页脚样式 === */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    opacity: 0.8;
}

/* === 响应式设计 === */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .my-name {
        font-size: 2.2rem;
    }
    
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .history-container {
        grid-template-columns: 1fr;
    }
    
    .history-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .study-controls {
        flex-direction: column;
    }
    
    section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
}

/* === 动画效果 === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.
}